/*
 * @Description: sequlize-auto 自动生成的模型读取, 为了方便与项目原来的代码结合,修改了返回名,应该也可以通过添加选项在导入时修改名字
 * @Author: pinus
 * @Email: pinus0716@163.com
 * @Git: https://gitee.com/xyf97
 * @Date: 2021-10-09 11:29:49
 * @LastEditTime: 2021-10-09 11:50:08
 */
var DataTypes = require('sequelize').DataTypes

var _sp_attribute = require('./sp_attribute')
var _sp_category = require('./sp_category')
var _sp_consignee = require('./sp_consignee')
var _sp_express = require('./sp_express')
var _sp_goods = require('./sp_goods')
var _sp_goods_attr = require('./sp_goods_attr')
var _sp_goods_cats = require('./sp_goods_cats')
var _sp_goods_pics = require('./sp_goods_pics')
var _sp_manager = require('./sp_manager')
var _sp_order = require('./sp_order')
var _sp_order_goods = require('./sp_order_goods')
var _sp_permission = require('./sp_permission')
var _sp_permission_api = require('./sp_permission_api')
var _sp_report_1 = require('./sp_report_1')
var _sp_report_2 = require('./sp_report_2')
var _sp_report_3 = require('./sp_report_3')
var _sp_role = require('./sp_role')
var _sp_type = require('./sp_type')
var _sp_user = require('./sp_user')
var _sp_user_cart = require('./sp_user_cart')

function initModels(sequelize) {
  // 项目里用到的
  var AttributeModel = _sp_attribute(sequelize, DataTypes)
  var CategoryModel = _sp_category(sequelize, DataTypes)
  var GoodAttributeModel = _sp_goods_attr(sequelize, DataTypes)
  var GoodModel = _sp_goods(sequelize, DataTypes)
  var GoodPicModel = _sp_goods_pics(sequelize, DataTypes)
  var ManagerModel = _sp_manager(sequelize, DataTypes)
  var OrderGoodModel = _sp_order_goods(sequelize, DataTypes)
  var OrderModel = _sp_order(sequelize, DataTypes)
  var PermissionAPIModel = _sp_permission_api(sequelize, DataTypes)
  var PermissionModel = _sp_permission(sequelize, DataTypes)
  var ReportOneModel = _sp_report_1(sequelize, DataTypes)
  var ReportTwoModel = _sp_report_2(sequelize, DataTypes)
  var RoleModel = _sp_role(sequelize, DataTypes)
  // 没用到的
  var sp_consignee = _sp_consignee(sequelize, DataTypes)
  var sp_express = _sp_express(sequelize, DataTypes)
  var sp_goods_cats = _sp_goods_cats(sequelize, DataTypes)
  var sp_report_3 = _sp_report_3(sequelize, DataTypes)
  var sp_type = _sp_type(sequelize, DataTypes)
  var sp_user = _sp_user(sequelize, DataTypes)
  var sp_user_cart = _sp_user_cart(sequelize, DataTypes)

  return {
    AttributeModel,
    CategoryModel,
    GoodAttributeModel,
    GoodModel,
    GoodPicModel,
    ManagerModel,
    OrderGoodModel,
    OrderModel,
    PermissionAPIModel,
    PermissionModel,
    ReportOneModel,
    ReportTwoModel,
    RoleModel
  }
}
module.exports = initModels
module.exports.initModels = initModels
module.exports.default = initModels
